package com.jiayinlending.jiayindai.net.http;

import com.jiayinlending.jiayindai.net.bean.Info;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by xiaohei on 2017/3/28.
 */

public interface ServerApi {
    @FormUrlEncoded
    @POST("/user/login")
    Call<String> update(
            @Field("first_name") String first,
            @Field("last_name") String last
    );

    @GET("http://ip.taobao.com/service/getIpInfo.php")
    Call<Info> getInfo(
            @Query("ip") String ip
    );
    @Headers({
            "Content-Type: application/json",
            "CLEARANCE: I_AM_AR_MASTER"})

    @POST("/user/login")
    Call<Info> getInfo(
            @Body Info info
    );
}
